package com.tianxinweb.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author cboy
 * @since 2018-07-19
 */
@TableName("tx_role")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;
    /**
     * 角色名称，最多32个字符
     */
    @NotNull
    @Length(max = 32,message = "角色名称超过32个字符")
    private String roleName;
    /**
     * 角色描述，可空，不空时最多255字符
     */
    @Length(max=255,message = "角色描述不能超过255个字符")
    private String roleDesc;
    /**
     * 权限id,json数据
     */
    @NotNull
    private String priviIds;

    private Date createTime;


    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    public String getPriviIds() {
        return priviIds;
    }

    public void setPriviIds(String priviIds) {
        this.priviIds = priviIds;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Role{" +
        ", roleId=" + roleId +
        ", roleName=" + roleName +
        ", roleDesc=" + roleDesc +
        ", priviIds=" + priviIds +
        ", createTime=" + createTime +
        "}";
    }
}
